
import Relay from "react-relay";
export default class DeleteProWorkShopMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { deleteProWorkShop }`;
    }

    getVariables() { 
        return {
            argsInput: {
                workShopId: this.props.workShopId,//车间ID（编辑的时候必须传值）
                enterpriseId: this.props.enterpriseId,//企业ID
                name: this.props.name,//车间名称
                operateUser: this.props.operateUser,//操作人名称-登录用户名称
                isSys: this.props.isSys,//是否是系统默认
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on deleteProWorkShopPayload  {
            deleteProWorkShop {
                errorCode
                value
                totalResult
                id
                proWorkShop{
                   
                    isSys
                    name
                    workShopId 
                    enterpriseId
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on deleteProWorkShopPayload  {
                    deleteProWorkShop {
                        errorCode
                        value
                        totalResult
                        id
                        proWorkShop{
                   
                            isSys
                            name
                            workShopId 
                            enterpriseId
                        }
                    }
                 }
            `]
        }];
    }

}
